3.1.10 \(\int \sec ^3(c+d x) (a+a \sin (c+d x)) \, dx\) [10]

Optimal. Leaf size=39 \[ \frac {a \tanh ^{-1}(\sin (c+d x))}{2 d}+\frac {a^2}{2 d (a-a \sin (c+d x))} \]

[Out]

1/2*a*arctanh(sin(d*x+c))/d+1/2*a^2/d/(a-a*sin(d*x+c))

________________________________________________________________________________________

Rubi [A]
time = 0.03, antiderivative size = 39, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.158, Rules used = {2746, 46, 212} \begin {gather*} \frac {a^2}{2 d (a-a \sin (c+d x))}+\frac {a \tanh ^{-1}(\sin (c+d x))}{2 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sec[c + d*x]^3*(a + a*Sin[c + d*x]),x]

[Out]

(a*ArcTanh[Sin[c + d*x]])/(2*d) + a^2/(2*d*(a - a*Sin[c + d*x]))

Rule 46

Int[((a_) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d*x
)^n, x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && ILtQ[m, 0] && IntegerQ[n] &&  !(IGtQ[n, 0] && Lt
Q[m + n + 2, 0])

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 2746

Int[cos[(e_.) + (f_.)*(x_)]^(p_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.), x_Symbol] :> Dist[1/(b^p*f), S
ubst[Int[(a + x)^(m + (p - 1)/2)*(a - x)^((p - 1)/2), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x]
&& IntegerQ[(p - 1)/2] && EqQ[a^2 - b^2, 0] && (GeQ[p, -1] ||  !IntegerQ[m + 1/2])

Rubi steps

\begin {align*} \int \sec ^3(c+d x) (a+a \sin (c+d x)) \, dx &=\frac {a^3 \text {Subst}\left (\int \frac {1}{(a-x)^2 (a+x)} \, dx,x,a \sin (c+d x)\right )}{d}\\ &=\frac {a^3 \text {Subst}\left (\int \left (\frac {1}{2 a (a-x)^2}+\frac {1}{2 a \left (a^2-x^2\right )}\right ) \, dx,x,a \sin (c+d x)\right )}{d}\\ &=\frac {a^2}{2 d (a-a \sin (c+d x))}+\frac {a^2 \text {Subst}\left (\int \frac {1}{a^2-x^2} \, dx,x,a \sin (c+d x)\right )}{2 d}\\ &=\frac {a \tanh ^{-1}(\sin (c+d x))}{2 d}+\frac {a^2}{2 d (a-a \sin (c+d x))}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.02, size = 52, normalized size = 1.33 \begin {gather*} \frac {a \tanh ^{-1}(\sin (c+d x))}{2 d}+\frac {a \sec ^2(c+d x)}{2 d}+\frac {a \sec (c+d x) \tan (c+d x)}{2 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sec[c + d*x]^3*(a + a*Sin[c + d*x]),x]

[Out]

(a*ArcTanh[Sin[c + d*x]])/(2*d) + (a*Sec[c + d*x]^2)/(2*d) + (a*Sec[c + d*x]*Tan[c + d*x])/(2*d)

________________________________________________________________________________________

Maple [A]
time = 0.10, size = 50, normalized size = 1.28

method result size
derivativedivides \(\frac {\frac {a}{2 \cos \left (d x +c \right )^{2}}+a \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )}{d}\) \(50\)
default \(\frac {\frac {a}{2 \cos \left (d x +c \right )^{2}}+a \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )}{d}\) \(50\)
risch \(-\frac {i a \,{\mathrm e}^{i \left (d x +c \right )}}{\left ({\mathrm e}^{i \left (d x +c \right )}-i\right )^{2} d}-\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{2 d}+\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{2 d}\) \(70\)
norman \(\frac {\frac {a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}+\frac {a \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {2 a \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {2 a \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {2 a \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}}{\left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2} \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}-\frac {a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{2 d}+\frac {a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{2 d}\) \(151\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(d*x+c)^3*(a+a*sin(d*x+c)),x,method=_RETURNVERBOSE)

[Out]

1/d*(1/2*a/cos(d*x+c)^2+a*(1/2*sec(d*x+c)*tan(d*x+c)+1/2*ln(sec(d*x+c)+tan(d*x+c))))

________________________________________________________________________________________

Maxima [A]
time = 0.30, size = 42, normalized size = 1.08 \begin {gather*} \frac {a \log \left (\sin \left (d x + c\right ) + 1\right ) - a \log \left (\sin \left (d x + c\right ) - 1\right ) - \frac {2 \, a}{\sin \left (d x + c\right ) - 1}}{4 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^3*(a+a*sin(d*x+c)),x, algorithm="maxima")

[Out]

1/4*(a*log(sin(d*x + c) + 1) - a*log(sin(d*x + c) - 1) - 2*a/(sin(d*x + c) - 1))/d

________________________________________________________________________________________

Fricas [A]
time = 0.36, size = 67, normalized size = 1.72 \begin {gather*} \frac {{\left (a \sin \left (d x + c\right ) - a\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) - {\left (a \sin \left (d x + c\right ) - a\right )} \log \left (-\sin \left (d x + c\right ) + 1\right ) - 2 \, a}{4 \, {\left (d \sin \left (d x + c\right ) - d\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^3*(a+a*sin(d*x+c)),x, algorithm="fricas")

[Out]

1/4*((a*sin(d*x + c) - a)*log(sin(d*x + c) + 1) - (a*sin(d*x + c) - a)*log(-sin(d*x + c) + 1) - 2*a)/(d*sin(d*
x + c) - d)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} a \left (\int \sin {\left (c + d x \right )} \sec ^{3}{\left (c + d x \right )}\, dx + \int \sec ^{3}{\left (c + d x \right )}\, dx\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)**3*(a+a*sin(d*x+c)),x)

[Out]

a*(Integral(sin(c + d*x)*sec(c + d*x)**3, x) + Integral(sec(c + d*x)**3, x))

________________________________________________________________________________________

Giac [A]
time = 5.12, size = 54, normalized size = 1.38 \begin {gather*} \frac {a \log \left ({\left | \sin \left (d x + c\right ) + 1 \right |}\right ) - a \log \left ({\left | \sin \left (d x + c\right ) - 1 \right |}\right ) + \frac {a \sin \left (d x + c\right ) - 3 \, a}{\sin \left (d x + c\right ) - 1}}{4 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^3*(a+a*sin(d*x+c)),x, algorithm="giac")

[Out]

1/4*(a*log(abs(sin(d*x + c) + 1)) - a*log(abs(sin(d*x + c) - 1)) + (a*sin(d*x + c) - 3*a)/(sin(d*x + c) - 1))/
d

________________________________________________________________________________________

Mupad [B]
time = 0.06, size = 30, normalized size = 0.77 \begin {gather*} \frac {a\,\mathrm {atanh}\left (\sin \left (c+d\,x\right )\right )}{2\,d}-\frac {a}{2\,d\,\left (\sin \left (c+d\,x\right )-1\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + a*sin(c + d*x))/cos(c + d*x)^3,x)

[Out]

(a*atanh(sin(c + d*x)))/(2*d) - a/(2*d*(sin(c + d*x) - 1))

________________________________________________________________________________________